<!--
*- coding = utf-8 -*-
#@Time : 2023/6/26 11:45
#@Author : 管茂良
#@File : index.vue
#@web  : www.php-china.com
#@Software: WebStorm
-->
<template>
  <div class="app-container">
    <TopNav :title="'用户信息'" style="position: relative;border-bottom:1px solid rgba(0,0,0,0.1)">
      <template #leftIcon>
        <SvgIcon @click="handleToBack" :size="'15'" :iconClass="'left'" />
      </template>
      <template #rightIcon>
        <SvgIcon @click="handleToSetting" :size="'15'" :iconClass="'more'" />
      </template>
    </TopNav>
    <view>
<!--      用户信息-->
      <CommonList :isShowLineStyle="false" @click="handleToPage('setting')" >
        <template #leftSlot>
          <view style="width: 150rpx;height:150rpx;">
              <CommonImage style="width:100%;height:100%" mode="widthFix" :picUrl="'/static/img/doctor_img01.png'"/>
          </view>
        </template>
        <template #content>
          <view>
            <view class="u-f" style="line-height: 48rpx;font-size: 34rpx;">
              <view class="margin-right-5" style="font-weight: bold">王春玲</view>
              <view class="u-f u-f-ac u-f-ajc"><SvgIcon :size="'15'" style="color:red" :iconClass="'girl'" /></view>
            </view>
            <view class="u-f" style="line-height: 48rpx;font-size: 26rpx;">
              <view class="margin-right-5" style="line-height: 48rpx;">姓名:</view>
              <view>xxxx</view>
            </view>
            <view class="u-f" style="line-height: 48rpx;font-size: 26rpx;">
              <view class="margin-right-5" style="line-height: 48rpx;">WeiXin Id:</view>
              <view>xxxxxxxxxx</view>
            </view>
            <view class="u-f" style="line-height: 48rpx;font-size: 26rpx;">
              <view class="margin-right-5" style="line-height: 48rpx;">姓名:</view>
              <view>xxxx</view>
            </view>
          </view>
        </template>
        <template #rightSlot>
          <view></view>
        </template>
      </CommonList>
      <CommonList :title="'电话'" @click="handleToPage('setting')" >
        <template #content>
          <view style="color:#00a5dc;">
            3333333333333
          </view>
        </template>
      </CommonList>
      <CommonList :title="'备注'" @click="handleToPage('setting')" >
        <template #content>
          <view style="line-height:30rpx;" class="text-l2">
            33333333333333333333333333333333333333333333333333333333333333333
          </view>
        </template>
      </CommonList>
      <CommonList :title="'隐私'" :isShowLineStyle="false" @click="handleToPage('setting')" >
        <template #content>
          <view style="line-height:30rpx;" class="text-l">
           111111
          </view>
        </template>
      </CommonList>
    </view>
    <view class="margin-top-5">
      <CommonList :title="'瞬间'" @click="handleToPage('setting')" >
        <template #content>
          <view style="line-height:30rpx;" class="text-l">
            22222
          </view>
        </template>
      </CommonList>
      <CommonList :title="'简介'" :isShowLineStyle="false" :isShowRightIcon="false" @click="handleToPage('setting')" >
        <template #content>
          <view style="line-height:30rpx;" class="text-l2">
            33333333333333333333333333333333333333333333333333333333333333333
          </view>
        </template>
      </CommonList>
    </view>

    <view class="margin-top-10">
      <button type="default" @click="handleToChatInfo">发送消息</button>
    </view>

  </div>
</template>

<script setup lang="ts">
import CommonList from "@/components/commonList/index"
import TopNav from "@/components/topNav/index"
import CommonImage from "@/components/commonImage/index"
import {handlePageTo} from "@/utils/utils";
import {onMounted, ref} from "vue";
import {useRoute,useRouter} from "vue-router";

let route = useRoute()
let router = useRouter()
let userInfoInit = {
  uid:1,
  nickName:"",
}
let userInfo = ref<any>(userInfoInit)
//返回首页
const handleToBack = ()=>{
  router.go(-1)
}
//跳转用户设置页
const handleToSetting = ()=>{
  handlePageTo("navigateTo","/pageCommon/chatInfo/chatSetting/index")
}
//跳转到聊天页
const handleToChatInfo = (val:any)=>{
  let {id} = val;
  handlePageTo("navigateTo","/pageChats/chatPage/index?id="+id)
}
//跳转页面
const handleToPage = (pageName:string)=>{

}
onMounted(()=>{
  userInfo.value.uid = route.params.uid
  console.log(route.params,"ssssssssssss");
})
</script>

<style scoped lang="less">
.app-container{
  max-height: 100%;
  min-height: 100vh;
}
</style>
